package com.hmkj.core.mapper.amount;

import com.hmkj.common.baseMapper.GenericMapper;
import com.hmkj.core.model.amount.AccountLogSimulateModel;
import com.hmkj.core.po.amount.AccountLogSimulate;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 模拟资金记录表相关Dao接口<br>
 *
 * @author eproo
 * @date   2017-11-19 05:19:03
 */
public interface AccountLogSimulateMapper extends GenericMapper< AccountLogSimulate,Integer> {

    @Override
    @Select("SELECT count(1) FROM fm_account_log_simulate t LEFT JOIN biz_user u ON t.user_id = u.id  WHERE 1=1 ${whereSql} ${sortSql} ")
    long countBySqlJoin(Map<String, Object> params);

    @Override
    @Select("SELECT t.*, u.user_name AS 'u.userName',u.mobile AS 'u.mobile' FROM fm_account_log_simulate t LEFT JOIN biz_user u ON t.user_id = u.id WHERE 1=1 ${whereSql} ${sortSql} limit ${nowPage}, ${pageSize} ")
    List<AccountLogSimulateModel> findListBySqlJoin(Map<String, Object> params);
}
